package com.yoda.mall.admin.controller;

import com.yoda.mall.admin.service.MemberService;
import com.yoda.mall.model.entity.ums.MemberLevel;
import com.yoda.mall.model.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("memberLevel")
public class MemberLevelController {
    @Autowired
    private MemberService memberService;

    /**
     * 查询所有会员等级
     * @param defaultStatus
     * @return
     */
    @GetMapping("list")
    public R<List<MemberLevel>> list(Integer defaultStatus){
        List<MemberLevel> list = memberService.list(defaultStatus);
        return R.success(list);
    }

}
